<template>
  <div id="temp_manage" class="container">
    <div class="content">
      <div class="title">合同模板管理</div>
      <div class="panel">
        <div class="temp_list">
          <div class="temp_item">
            <div class="temp_item_icon" @click="test()">
              合同
              <br />未启用
            </div>
            <div class="temp_item_title">托育合同2019</div>
            <div>启用时间：2019-12-02</div>
            <div>创建人：罗琴</div>
          </div>
          <div class="temp_item">
            <div class="temp_item_icon" @click="editContract()">+</div>
            <div class="temp_item_title">新增</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
let vm;
let user;
export default {
  data() {
    return {};
  },
  methods: {
    test() {
      var path = vm.$store.state.permit["111"].path;
      //传递参数
      this.$router.push({
        path: path,
        query: { contractTempId: 123 }
      });
    },
    editContract(item) {
      if (!item) {
        var path = vm.$store.state.permit["111"].path;
        //传递参数
        this.$router.push({
          path: path
        });
      }
    }
  },
  mounted() {
    vm = this;
    user = tool.getItem(lsKey.user, true); //得到当前用户信息
  }
};
</script>

<style lang="scss">
#temp_manage {
  .temp_list {
    margin: 0.3rem;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    .temp_item {
      color: #666666;
      font-size: 0.16rem;
      width: 2rem;
      margin-right: 0.3rem;
      .temp_item_icon {
        height: 2.5rem;
        border: 1px solid #acacac;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.24rem;
        cursor: pointer;
      }
      .temp_item_title {
        text-align: center;
        font-size: 0.2rem;
      }
    }
  }
}
</style>
<style scoped src="@/style/clue_manage/clue_manage.css"></style>